package com.xyazm.order.mapstruct;

import com.xyazm.coupon.domain.param.ReleaseUserCouponParam;
import com.xyazm.coupon.domain.param.UseUserCouponParam;
import com.xyazm.customer.domain.param.ReceiveAfterSaleAuditParam;
import com.xyazm.fulfill.domain.event.OrderDeliveredEvent;
import com.xyazm.fulfill.domain.event.OrderOutStockEvent;
import com.xyazm.fulfill.domain.event.OrderSignedEvent;
import com.xyazm.fulfill.domain.param.CancelFulfillParam;
import com.xyazm.inventory.domain.param.ReleaseProductStockParam;
import com.xyazm.market.domain.param.CalculateOrderAmountParam;
import com.xyazm.inventory.domain.param.DeductProductParam;
import com.xyazm.order.domain.dto.*;
import com.xyazm.order.domain.entity.*;
import com.xyazm.order.domain.param.*;
import com.xyazm.pay.domain.dto.PayOrderDTO;
import com.xyazm.pay.domain.param.PayOrderParam;
import com.xyazm.risk.domain.param.CheckOrderRiskParam;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 订单api 转换类
 * @author xuyou
 * @date 2022年04月29日 22:39
 */
@Mapper
public interface OrderApiMapstruct {

    OrderApiMapstruct INSTANCE = Mappers.getMapper(OrderApiMapstruct.class);

    CalculateOrderAmountParam convertCalculateOrderAmountParam(CreateOrderParam param);

    UseUserCouponParam convertUseUserCouponParam(CreateOrderParam param);

    ReleaseUserCouponParam convertReleaseUserCouponParam(CreateOrderParam param);

    DeductProductParam convertLockProductParam(CreateOrderParam param);

    OrderInfoDO convertOrderInfo(OrderInfoDO param);

    OrderItemDO convertOrderItem(OrderItemDO param);

    OrderDeliveryDetailDO convertOrderDeliveryDetail(OrderDeliveryDetailDO param);

    OrderAmountDO convertOrderAmount(OrderAmountDO param);

    OrderAmountDetailDO convertOrderAmountDetail(OrderAmountDetailDO param);

    OrderPaymentDetailDO convertOrderPaymentDetail(OrderPaymentDetailDO param);

    OrderOperateLogDO convertOrderOperateLog(OrderOperateLogDO param);

    OrderSnapshotDO convertOrderSnapshot(OrderSnapshotDO param);

    OrderInfoDTO convertOrderInfoDTO(OrderInfoDO param);

    OrderItemDTO convertOrderItemDTO(OrderItemDO param);

    List<OrderItemDTO> convertOrderItemDTO(List<OrderItemDO> param);

    CancelOrderAssembleDTO convertCancelOrderAssembleDTO(CancelOrderParam param);

    OrderInfoDO convertOrderInfo(OrderInfoDTO param);

    CancelFulfillParam convertCancelFulfillParam(OrderInfoDTO param);

    PayOrderParam convertPayOrderParam(PrePayOrderParam param);

    PrePayOrderDTO convertPrePayOrderDTO(PayOrderDTO param);

    OrderAmountDetailDTO convertOrderAmountDetailDTO(OrderAmountDetailDO param);

    List<OrderAmountDetailDTO> convertOrderAmountDetailDTO(List<OrderAmountDetailDO> param);

    OrderDeliveryDetailDTO convertOrderDeliveryDetailDTO(OrderDeliveryDetailDO param);

    OrderPaymentDetailDTO convertOrderPaymentDetailDTO(OrderPaymentDetailDO param);

    List<OrderPaymentDetailDTO> convertOrderPaymentDetailDTO(List<OrderPaymentDetailDO> param);

    OrderOperateLogDTO convertOrderOperateLogDTO(OrderOperateLogDO param);

    List<OrderOperateLogDTO> convertOrderOperateLogDTO(List<OrderOperateLogDO> param);

    OrderSnapshotDTO convertOrderSnapshotDTO(OrderSnapshotDO param);

    List<OrderSnapshotDTO> convertOrderSnapshotDTO(List<OrderSnapshotDO> param);

    CancelOrderAssembleParam convertCancelOrderAssembleParam(CancelOrderAssembleDTO param);

    ReleaseUserCouponParam convertReleaseUserCouponParam(OrderInfoDO param);

    List<ReleaseProductStockParam.OrderItemParam> convertOrderItemParam(List<OrderItemDO> param);

    List<ReleaseProductStockParam.OrderItemParam> convertOrderItemParam2(List<ReleaseProductStockDTO.OrderItemDTO> param);

    AfterSaleItemDTO convertAfterSaleItemDTO(OrderItemDO param);

    List<AfterSaleItemDTO> convertAfterSaleItemDTO(List<AfterSaleItemDO> param);

    AfterSaleInfoDTO convertAfterSaleInfoDTO(AfterSaleInfoDO param);

    List<AfterSaleRefundDTO> convertAfterSaleRefundDTO(List<AfterSaleRefundDO> param);

    List<AfterSaleLogDTO> convertAfterSaleLogDTO(List<AfterSaleLogDO> param);

    CheckOrderRiskParam convertCheckOrderRiskParam(CreateOrderParam param);

    List<DeductProductParam.OrderItemParam> convertDeductProductOrderItemParam(List<CreateOrderParam.OrderItemParam> param);

    List<ReleaseProductStockParam.OrderItemParam> convertReleaseProductStockParamOrderItemParam(List<CreateOrderParam.OrderItemParam> param);

    AfterFulfillDTO convertAfterFulfillDTO(OrderOutStockEvent event);

    AfterFulfillDTO convertAfterFulfillDTO(OrderDeliveredEvent event);

    AfterFulfillDTO convertAfterFulfillDTO(OrderSignedEvent event);

    ManualAfterSaleDTO convertManualAfterSaleDTO(ApplyAfterSaleParam applyAfterSaleParam);

    AfterSaleItemDO convertAfterSaleItemDO(AfterSaleItemDTO afterSaleItemDTO);

    ReceiveAfterSaleAuditParam convertReceiveAfterSaleAuditParam(ManualAfterSaleDTO manualAfterSaleDTO);
}
